package de.tu_darmstadt.gdi.battleship;

/**
 * This class represents a section of a ship
 * @author Marcel Andreas Gazsi
 *
 */
public class Section {

	public int ammunition = 5;
	public int x,y;
	private boolean hit = false;
	private char symbol;
	
	public Section(int x, int y, char c){
		this.x = x;
		this.y = y;
		this.symbol = c;
	}
	
	public char getSymbol(){
		return this.symbol;
	}
	/**
	 * Sets the hit var to true
	 */
	public void wasHit(){
		this.hit = true;
		this.symbol = Character.toUpperCase(this.symbol);
	}
	
	public boolean isDestroied(){
		return this.hit;
	}
}
